package com.ruoyi.web.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiModel("用户留言实体")
@TableName("user_message")
public class UserMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    @TableId(value = "base_id", type = IdType.AUTO)
    private Long baseId;

    @ApiModelProperty("留言内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("访问码")
    @TableField("access_code")
    private String accessCode;

    @ApiModelProperty("信息来源")
    @TableField("source")
    private String source;

    /**
     * '1'首页，'2'摄像头
     */
    @ApiModelProperty("摄像头ID")
    @TableField("camera_id")
    private Long cameraId;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Long userId;

    /**
     * '1'访问码，'2'系统用户
     */
    @ApiModelProperty("留言人类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("来源名称")
    @TableField("source_name")
    private String sourceName;

    @ApiModelProperty("留言时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
